-
Notifications
You must be signed in to change notification settings - Fork 114
Centralize dependency diagnostics in ValidateDependencies
action
#675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centralize dependency diagnostics in ValidateDependencies
action
#675
Conversation
@swift-ci please test |
@@ -493,7 +494,7 @@ fileprivate struct DependencyValidationTests: CoreBasedTests { | |||
TestStandardTarget( | |||
"CoreFoo", type: .framework, | |||
buildPhases: [ | |||
TestSourcesBuildPhase(["CoreFoo.m"]), | |||
TestSourcesBuildPhase(["CoreFoo.m", "CoreBar.m"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it so that the test would see duplicate diagnostics in the old implementation which this PR then fixes.
@swift-ci please test |
Linux jobs are failing with
|
Also same issue on Windows (TIL on Windows, the testing output uses |
@swift-ci please test |
From the cmake job:
I guess I need to update the configs for that. |
@swift-ci please test |
1 similar comment
@swift-ci please test |
The failures on focal are expected and we're dropping the jobs in #676 |
Sources/SWBCore/SpecImplementations/Tools/ValidateDependencies.swift
Outdated
Show resolved
Hide resolved
diagnostics.append(contentsOf: context.makeDiagnostics(imports: allImports.map { ($0.dependency, $0.importLocations) })) | ||
} | ||
|
||
for diagnostic in diagnostics { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still going to create duplicates if both clang and swift sources in the same target have the same module deps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's time to merge the Swift and Clang tests as part of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
I think I'll make that a separate PR since this one is already a sizable change and self-contained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#696 is the follow-up for avoiding cross-language duplication
Instead of emitting diagnostics directly, individual tasks emit .dependencies files which are read by a per-target action which aggregates them. This avoids duplication of diagnostics across tasks. rdar://156174696
The toolchains in CI are currently breaking this test.
c4f05f2
to
5f3e28f
Compare
@swift-ci please test |
Instead of emitting diagnostics directly, individual tasks emit .dependencies files which are read by a per-target action which aggregates them. This avoids duplication of diagnostics across tasks.
rdar://156174696